package com.yiqi.news.mvp.ui.adapter

import android.view.View.GONE
import android.view.View.VISIBLE
import cn.jzvd.JzvdStd
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.socks.library.KLog
import com.yiqi.huize.loadImage
import com.yiqi.news.R
import com.yiqi.news.app.utils.TimeUtils
import com.yiqi.news.app.utils.UIUtils
import com.yiqi.news.app.video.VideoPathDecoder
import com.yiqi.news.app.video.VideoStateListenerAdapter
import com.yiqi.news.entity.CashRecord
import com.yiqi.news.entity.News
import kotlinx.android.synthetic.main.item_coins_record.view.*
import kotlinx.android.synthetic.main.item_video.view.*
import kotlinx.android.synthetic.main.item_withdraw_record.view.*
import kotlinx.android.synthetic.main.item_withdraw_record.view.tv_money
import kotlinx.android.synthetic.main.item_withdraw_record.view.tv_time

class WithdrawRecordAdapter : BaseQuickAdapter<CashRecord, BaseViewHolder>(R.layout.item_withdraw_record) {

    override fun convert(helper: BaseViewHolder, item: CashRecord) {
        val itemView = helper.itemView
        itemView.tv_title.text = item.accBankName
        itemView.tv_time.text = "申请时间：" + TimeUtils.stampToDate(item.createTime)
        itemView.tv_money.text = "+" + item.money + "元"
        //-1、提现失败 0、提现中 1、提现成功 ,
        when (item.cashStatus) {
            -1 -> itemView.tv_stauts.text = "提现失败"
            0 -> itemView.tv_stauts.text = "提现中"
            1 -> itemView.tv_stauts.text = "提现成功"
        }
    }
}